package main

import "log"

// 业务处理命令，必须唯一
const command = "ST"

func init() {}

func main() {}

// ProcessorRegistry 业务处理程序注册器
func ProcessorRegistry(processers map[string]func([]byte, *log.Logger, ...interface{}) ([]byte, error)) {
	processers[command] = Process
}

// Process 业务处理程序执行过程
func Process(message []byte, logger *log.Logger, exts ...interface{}) ([]byte, error) {
	logger.Printf("\"%s\" unpack data string is: %s", command, message)
	return []byte(command + "OK"), nil
}
